home *** CD-ROM | disk | FTP | other *** search
- 10 poke56,56:clr:dv=peek(186):ifdv<8ordv>29thendv=8
- 12 poke788,49:tq=ti
- 14 poke53281,0:poke53280,0:print"[147]":gosub60000
- 20 sys57812"spiral font",dv,0:poke780,0:poke781,0:poke782,56:sys65493
- 22 ifti<tq+100then22
- 30 poke53272,31
- 100 gosub 1000: rem initialize
- 110 gosub 2000: rem instructions
- 120 gosub 3000: rem conditions, board
- 130 on m goto 140,140,180,180
- 140 gosub 5000: rem player move
- 150 if jk=1 then 7200:rem stopped
- 160 jj=hh: gosub 8000: if em=0 then on w goto 7000,7100: rem game won/lost
- 170 y=5-y: on m goto 180,140,180,110
- 180 gosub 6000: rem computer move
- 190 if jk=1 then 7200: rem stopped
- 200 jj=hh: gosub 8000: if em=0 then on w goto 7000,7100: rem game won/lost
- 210 y=5-y: on m goto 140,110,140,180
- 1000 dimm%(38,2),a%(3),b%(3,5),s$(5),d$(1):rem poke808,225:poke818,32
- 1010 poke53371,0:fori=1to38:readm%(i,0):readm%(i,1):next
- 1020 data10,13,10,15,12,15,14,15,14,13,14,11,14,9,14,7,12,7,10,7,8,7,6,7,6,9
- 1030 data6,11,6,13,6,15,6,17,6,19,8,19,10,19,12,19,14,19,16,19,18,19,18,17
- 1040 data18,15,18,13,18,11,18,9,18,7,18,5,18,3,16,3,14,3,12,3,10,3,8,3,6,3
- 1050 b$=" [157][157][157][157][157][157][157][157][157][157][157][157]":b1$=b$+b$+b$+b$+b$+b$+b$+b$+b$
- 1060 fori=0to5:reads$(i):next
- 1070 data"[195][207][205][208][213][212][197][210] 2","[208][204][193][217][197][210] ","[208][204][193][217][197][210] 1 ","[208][204][193][217][197][210] 2 ","[195][207][205][208][213][212][197][210] "
- 1080 data"[195][207][205][208][213][212][197][210] 1"
- 1090 m=1:w=1:sm=1:d$(0)="[167][170][157][157][181][175]":d$(1)="[171][178][157][157][174][163]":return
- 2000 poke53280,0:poke53281,0:printchr$(14);chr$(8);:rem by floyd r. kirk
- 2010 print"[147]";tab(12);"[158][188][172][157][157][177][187][157][157][165][180][145][208][201][210][193][204] [145][188][172][157][157][177][187][157][157][165][180][145][204][201][196][197][154]"
- 2020 print" [217]ou determine the initial layout of"
- 2030 print"the board by placing several coins in a"
- 2040 print"series of boxes connected in a spiral,"
- 2050 print"one coin to a box. [193]fter the coins are"
- 2060 print"placed, you and the computer alternate"
- 2070 print"sliding any one coin toward the center,"
- 2080 print"up to but not on or past the next coin"
- 2090 print"or the center of the spiral. [212]he game"
- 2100 print"ends when no further moves are possible.";
- 2110 print" [217]ou decide whether the one making the"
- 2120 print"last move wins or loses, who moves"
- 2130 print"first, and how many coins are set in"
- 2140 print"which boxes. [207]n your turn, move using"
- 2150 print"the left and right cursor keys, then"
- 2160 print"select a square; the immediate outside"
- 2170 print"coin will slide in to that square."
- 2180 print" [195]an't beat the computer? [212]hen switch"
- 2190 print"sides, play against another person, or"
- 2200 print"watch the computer play itself."
- 2210 print" [159][208]ress a key";:poke198,0
- 2220 geta$:ifa$=""then2220
- 2230 return
- 3000 poke53280,12:poke53281,12
- 3005 print"[147]";tab(12);"[158][188][172][157][157][177][187][157][157][165][180][145][208][201][210][193][204] [145][188][172][157][157][177][187][157][157][165][180][145][204][201][196][197]"
- 3010 print" [205]oves 1st vs. [205]oves 2nd"
- 3012 print" [144][185][185][185][185][185][185][185][185][185][185][185][185] [185][185][185][185][185][185][185][185][185][185][185][185] f1 [195]hange"
- 3015 print"[144][161] [162][161] [162] players.";
- 3017 print" [144][182][182][182][182][182][182][182][182][182][182][182][182] [182][182][182][182][182][182][182][182][182][182][182][182]"
- 3020 print"[196]oes the one who makes":print"the last move win or":print"lose?"
- 3022 printtab(7);"[144][185][185][185][185][185][185]";tab(29);"f3 [195]hange"
- 3025 printtab(6);"[144][161] [162]";tab(32);"last"
- 3027 printtab(7);"[144][182][182][182][182][182][182]";tab(32);"move."
- 3030 print"[215]ho puts the coins":print"on the board?"
- 3032 print" [144][185][185][185][185][185][185][185][185][185][185]";tab(29);"f5 [195]hange"
- 3035 print" [144][161]"tab(14);"[162]";tab(32);"coin"
- 3037 print" [144][182][182][182][182][182][182][182][182][182][182]";tab(32);"layer."
- 3040 printtab(29);"f7 [196]one."
- 3050 y=m-(m>2):r=6:c=2:gosub9000:prints$(y);""s$(5-y)
- 3060 r=12:c=8:gosub9000:ifw=1thenprint"[215][201][206] ":goto3070
- 3065 print"[204][207][211][197]"
- 3070 r=17:c=5:gosub9000:printleft$(s$(sm),8):poke198,0
- 3080 geta$:ifa$=""then3080
- 3090 ifa$="[135]"thensm=5-sm:goto3070
- 3095 ifa$="[134]"thenw=3-w:goto3060
- 3100 ifa$="[136]"then3120
- 3105 ifa$<>"[133]"then3080
- 3110 m=m+1:ifm=5thenm=1
- 3115 goto3050
- 3120 gosub4000:ifsm=4then3500
- 3121 r=5:c=27:gosub9000:print"3 coins.":printtab(27);"[208]ress [176] or [191]"
- 3123 printtab(27);"to move":printtab(27);"white box."
- 3124 printtab(27);"f7 [208]ick up":printtab(30);"or drop":printtab(30);"a coin."
- 3126 printtab(27);"f1 [196]one."
- 3128 print"";tab(27);:ifm=1thenprint"[217]ou have":goto3130
- 3129 print"[195]omputer has"
- 3130 printtab(27);"first move.":printtab(27);"[204]ast move":printtab(27);
- 3132 ifw=1thenprint"wins.":goto3135
- 3133 print"loses."
- 3135 cn=3:i=1:r=m%(i,0):c=m%(i,1):gosub9000:print"";d$(m%(i,2));""
- 3140 ch$="[157][136][133]":poke198,0
- 3150 geta$:ifa$=""thengosub9100:goto3150
- 3160 jl=0:forj=1to4:ifa$=mid$(ch$,j,1)thenjl=j:j=4
- 3170 next:ifjl=0then3150
- 3180 onjlgoto3200,3250,3300,3350
- 3200 il=i:i=i-1:ifi=0theni=38
- 3210 r=m%(il,0):c=m%(il,1):gosub9000:print"";d$(m%(il,2))
- 3220 r=m%(i,0):c=m%(i,1):gosub9000:print"";d$(m%(i,2));"":goto3150
- 3250 il=i:i=i+1:ifi=39theni=1
- 3260 goto3210
- 3300 ifcn<1andm%(i,2)=0then3150
- 3310 m%(i,2)=1-m%(i,2):ifm%(i,2)=0thencn=cn+1:goto3330
- 3320 cn=cn-1
- 3330 print"";tab(26);cn;"coin [157][157]";:ifcn<>1thenprint"s";
- 3340 print".":r=m%(i,0):c=m%(i,1):gosub9000:print"";d$(m%(i,2));"":goto3150
- 3350 r=5:c=27:gosub9000:printb1$;"[145]";b1$
- 3355 r=m%(i,0):c=m%(i,1):gosub9000:print"";d$(m%(i,2))
- 3360 hh=0:jj=38:gosub8000:ifem>0thenpoke53280,0:poke53281,0:return
- 3370 r=7:c=27:gosub9000:print"[212]oo simple!"
- 3380 printtab(27);"[212]ry again.":poke198,0
- 3390 forj=1to38:m%(j,2)=0:next:poke53370,0
- 3400 forj=1to500:geta$:ifa$<>""thenj=500
- 3410 next:poke53371,0:goto3120
- 3500 i=int(rnd(0)*2)+2
- 3510 j=int(rnd(0)*37)+2:ifm%(j,2)=1then3510
- 3520 r=m%(j,0):c=m%(j,1):gosub9000:print"";d$(1):m%(j,2)=1:i=i-1:ifi>0then3510
- 3530 r=22:c=27:gosub9000:print"[204]ast move":printtab(27);
- 3540 ifw=1thenprint"wins.":goto3360
- 3550 print"loses."
- 3560 goto3360
- 4000 print"[147]"tab(30)"[158][188][172][208][201][210][193][204]"
- 4010 printtab(16)"[198]loyd [203]irk's [158][177][187]"
- 4020 printtab(30)"[158][165][180][204][201][196][197]":print:print
- 4030 print" [167][170] [167][170][167][170][167][170][167][170][167][170][167][170][167][170]"
- 4040 print" [181][175] [181][175][181][175][181][175][181][175][181][175][181][175][181][175]"
- 4050 print" [167][170] [167][170] [167][170]"
- 4060 print" [181][175] [181][175] [181][175]"
- 4070 print" [167][170] [167][170] [158][184][184][167][170][167][170] [167][170]"
- 4080 print" [181][175] [181][175] [158][184][184][181][175][181][175] [181][175]"
- 4090 print" [167][170] [167][170] [167][170] [167][170]"
- 4100 print" [181][175] [181][175] [181][175] [181][175]"
- 4110 print" [167][170] [167][170][167][170][167][170][167][170][167][170] [167][170]"
- 4120 print" [181][175] [181][175][181][175][181][175][181][175][181][175] [181][175]"
- 4130 print" [167][170] [167][170]"
- 4140 print" [181][175] [181][175]"
- 4150 print" [167][170][167][170][167][170][167][170][167][170][167][170][167][170][167][170][167][170]"
- 4160 print" [181][175][181][175][181][175][181][175][181][175][181][175][181][175][181][175][181][175]"
- 4170 return
- 5000 r=5:c=27:gosub9000:print"";s$(y);"":i=1:jk=0
- 5002 ifm%(i,2)=1theni=i+1:goto5002
- 5005 print:printtab(27);:ifem=1thenprintb$:goto5020
- 5010 print"[154][208]ress [176][154] or [191][154]":printtab(27);"to move":printtab(27);"white box."
- 5020 r=11:c=27:gosub9000:print"f7[154] [211]elect":printtab(30);"square."
- 5022 ifm=1orm=3thenprint:printtab(27);"f2[154] [211]witch":printtab(30);"sides."
- 5025 printtab(27);"f6[154] [197]nd game."
- 5035 r=m%(i,0):c=m%(i,1):gosub9000:print"";d$(m%(i,2));"":ch$="[157][136][139][137]":poke198,0
- 5050 geta$:ifa$=""thengosub9100:goto5050
- 5060 jl=0:forj=1to5:ifa$=mid$(ch$,j,1)thenjl=j:j=5
- 5070 next:ifjl=0then5050
- 5080 onjlgoto5100,5150,5200,5250,5300
- 5100 il=i
- 5110 i=i-1:ifi=0theni=hh-1
- 5120 ifm%(i,2)=1then5110
- 5130 r=m%(il,0):c=m%(il,1):gosub9000:print"";d$(m%(il,2))
- 5140 r=m%(i,0):c=m%(i,1):gosub9000:print"";d$(m%(i,2));"":goto5050
- 5150 il=i
- 5160 i=i+1:ifi=hhtheni=1
- 5170 ifm%(i,2)=1then5160
- 5180 goto5130
- 5200 r=7:c=27:gosub9000:printb1$;b$;b$;b$
- 5210 m%(i,2)=1:j=i+1
- 5220 ifm%(j,2)=0thenj=j+1:goto5220
- 5230 m%(j,2)=0:r=m%(j,0):c=m%(j,1):gosub9000:print"";d$(0)
- 5235 r=m%(i,0):c=m%(i,1):gosub9000:print"";d$(1)
- 5240 return
- 5250 jk=1:goto5310
- 5300 ifm=2then5050
- 5310 r=7:c=27:gosub9000:printb1$;b$;b$;b$
- 5321 r=m%(i,0):c=m%(i,1):gosub9000:print"";d$(m%(i,2)):goto5240
- 6000 r=5:c=27:gosub9000:print"";s$(y);"":jk=0
- 6005 printtab(27);"[212]hinking...":ifm=4thenprinttab(27);"f6[154] [197]nd game."
- 6010 gosub8100:c2=0:forj=1to n:ifa%(j)=0thenc2=c2+1
- 6020 next:ifc2=nthen6300
- 6030 c2=0:c1=0:forj=1to n:ifa%(j)=1thenc1=c1+1:goto6040
- 6035 ifa%(j)>1thenc2=c2+1:k=j
- 6040 next:ifc2>1thengosub8100:goto6150
- 6045 ifc2=0then6100
- 6050 c2=0:forj=hhto2step-1:ifm%(j,2)=0then6070
- 6055 c2=c2+1:if2*k-1>c2then6070
- 6060 m%(j,2)=0:x=j:gosub8300:r=m%(j,0):c=m%(j,1):gosub9000:print"";d$(0):i=j:j=2
- 6070 next
- 6080 ifw<>1then6090
- 6082 c2=i-a%(k)-(c1/2<>int(c1/2)):m%(c2,2)=1
- 6084 r=m%(c2,0):c=m%(c2,1):gosub9000:print"";d$(1):x=c2:gosub8300:goto6340
- 6090 c2=i-a%(k)-(c1/2=int(c1/2)):m%(c2,2)=1
- 6095 r=m%(c2,0):c=m%(c2,1):gosub9000:print"";d$(1):x=c2:gosub8300:goto6340
- 6100 forj=hhto2step-1:ifm%(j,2)=0orm%(j-1,2)=1then6120
- 6110 m%(j,2)=0:x=j:gosub8300:r=m%(j,0):c=m%(j,1):gosub9000:print"";d$(0)
- 6112 m%(j-1,2)=1:r=m%(j-1,0):c=m%(j-1,1):gosub9000:print"";d$(1)
- 6115 x=j-1:gosub8300:j=2
- 6120 next:goto6340
- 6150 fori=1to n:e=a%(i):forj=0to5:f=e/2:b%(i,j)=2*(f-int(f)):e=int(f):next:next
- 6160 jl=0:forj=5to0step-1:c2=0:h=0:fori=1to n:ifb%(i,j)=0then6190
- 6170 c2=c2+1:ifa%(i)<=hthen6190
- 6180 h=a%(i):g=i
- 6190 next
- 6200 ifc2/2<>int(c2/2)thenjl=1:j=0
- 6210 next:ifjl=0then6300
- 6220 d=a%(g):a%(g)=0:forj=0to5:b%(g,j)=0:c2=0:fori=1to n:ifb%(i,j)=1thenc2=c2+1
- 6230 next:a%(g)=a%(g)+2*(c2/2-int(c2/2))*2^j:next
- 6240 c2=0:forj=hhto2step-1:ifm%(j,2)=0then6270
- 6250 c2=c2+1:if2*g-1>c2then6270
- 6260 m%(j,2)=0:x=j:gosub8300:r=m%(j,0):c=m%(j,1):gosub9000:print"";d$(0):i=j:j=2
- 6270 next
- 6280 x=i-d+a%(g):m%(x,2)=1:r=m%(x,0):c=m%(x,1):gosub9000:print"";d$(1)
- 6290 gosub8300:goto6340
- 6300 forj=1tohh-1:ifm%(j,2)=1orm%(j+1,2)=0then6330
- 6310 m%(j+1,2)=0:x=j+1:gosub8300:r=m%(j+1,0):c=m%(j+1,1):gosub9000:print"";d$(0)
- 6315 m%(j,2)=1:r=m%(j,0):c=m%(j,1):gosub9000:print"";d$(1)
- 6320 x=j:gosub8300:j=hh-1
- 6330 next
- 6340 ifm=4thengeta$:ifa$="[139]"thenjk=1
- 6350 poke198,0:return
- 7000 r=7:c=27:gosub9000:print"[215][201][206][211]! "
- 7010 forj=0to320:poke53280,j and15:next:goto7300
- 7100 r=7:c=27:gosub9000:print"[204][207][211][197][211] "
- 7110 fork=1to35:forj=0to15:poke53270,j:next:next:poke53270,200:goto7300
- 7200 r=7:c=27:gosub9000:print"[154][199][193][205][197] [197][206][196][197][196]"
- 7210 r=22:c=27:gosub9000:printb$;b$;
- 7300 r=11:c=27:gosub9000:print"f7[154] [206]ew game"
- 7310 printtab(27);"f6[154] [209]uit":poke198,0
- 7320 geta$:ifa$=""thengosub9100:goto7320
- 7330 ifa$="[136]"thenfori=1tohh:m%(i,2)=0:next:goto120
- 7340 ifa$<>"[139]"then7320
- 7350 printchr$(9);"[147]":poke808,237:poke818,237:goto40000
- 8000 em=0:forj=jjto1step-1:ifm%(j,2)=1thenhh=j:j=1
- 8010 next:ifhh<2then8040
- 8020 forj=1tohh:ifm%(j,2)=0thenem=em+1
- 8030 next
- 8040 ifem=0thenr=22:c=27:gosub9000:printb$;b$;
- 8050 return
- 8100 n=0:js=hh
- 8110 jm=0:forj=js to2step-1:ifm%(j,2)=0then8150
- 8120 fork=j-1to1step-1:ifm%(k,2)=0then8140
- 8130 n=n+1:a%(n)=j-k-1:js=k-1:k=1:j=2:jm=1
- 8140 next:ifjm=0thenn=n+1:a%(n)=j-1:j=2
- 8150 next
- 8160 ifjm=1andjs>1then8110
- 8170 return
- 8300 poke53370,0:r=m%(x,0):c=m%(x,1):gosub9000:forj1=1to4:print"";d$(1);
- 8310 print"[145][157][157]";:forj2=1to100:next:print"";d$(m%(x,2));"[145][157][157]";
- 8320 forj2=1to100:next
- 8330 next:print"";d$(m%(x,2)):poke53371,0:return
- 9000 poke781,r:poke782,c:poke783,0:sys65520:return
- 9100 poke53370,0:poke1435,126:fori3=1to45:next
- 9110 poke1435,120
- 9120 poke1436,126:fori3=1to40:next
- 9130 poke1436,120
- 9140 poke1476,126:fori3=1to35:next
- 9150 poke1476,120
- 9160 poke1475,126:fori3=1to30:next
- 9170 poke1475,120
- 9180 poke53371,0:return
- 10000 a$="0:b.spiral slide":dv=peek(186):ifdv<8ordv>29thendv=8
- 10010 open15,dv,15,"s"+a$:close15:savea$,dv:end
- 40000 fori=8to29:poke820+i,i:next:ifdv>8anddv<30thenpoke828,dv:poke820+dv,8
- 40010 a$="presenter":gosub40030:a$="hello connect":gosub40030
- 40020 print"[147]":poke53272,23:poke186,8:poke2048,0:poke44,8:poke43,1:end
- 40030 forj=8to29:i=peek(820+j):ifi=14thennext
- 40040 close2:open2,i,2:close2:ifstthen40060
- 40050 close15:open15,i,15,"r0:"+a$+"="+a$:input#15,er:close15:ifer=63then40070
- 40060 next:return
- 40070 a$="hello connect":q$=chr$(34):poke646,peek(53281):print"[147]":poke53272,23
- 40080 print"[147]p[207]2048,0:p[207]44,8:p[207]43,1:p[207]56,160:p[207]55,0:clr:l[207]"q$a$q$","i
- 40090 print"run:":poke631,13:poke632,13:poke198,2:end
- 60000 print"[147]":z$=" [152] ":poke214,10:print
- 60010 print" [155][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]":fori=0to11:printz$:next
- 60020 print" [151][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][152]"
- 60030 z$(0)="[211] [208] [201] [210] [193] [204] [211] [204] [201] [196] [197]
- 60040 z$(2)[178]"by ascloyd (NULL). (NULL)irk
- 60050 z$(4)="(c) 1998 by [202] & [198] [208]ublishing, [201]nc."
- 60060 z$(6)="[212]his program is not shareware
- 60070 z$(7)[178]"or in the public domain."
- 60080 z$(9)[178]"1-800-594-3370 or 1-318-221-8718
- 60090 poke214,12:print:fori=0to9:printtab(20-(len(z$(i))/2))""z$(i):next:return
- 60100 fori=0to6:printtab(20-(len(z$(i))/2))""z$(i):next:return
-